package tech.waterism.model.dto;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 降雨数据点
 * 
 * <p>包含时间戳和降雨量</p>
 * 
 * @author 高宇
 * @since 2025-11-13
 */
public class RainfallPoint {
    
    /** 时间戳 (格式: yyyy-MM-dd HH:mm:ss) */
    @JsonProperty("time")
    private String time;
    
    /** 降雨量 (mm) */
    @JsonProperty("rain")
    private Double rain;

    public RainfallPoint() {
    }

    public RainfallPoint(String time, Double rain) {
        this.time = time;
        this.rain = rain;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public Double getRain() {
        return rain;
    }

    public void setRain(Double rain) {
        this.rain = rain;
    }

    @Override
    public String toString() {
        return "RainfallPoint{" +
                "time='" + time + '\'' +
                ", rain=" + rain +
                '}';
    }
}
